package com.szzg10.thinking.chapter18;

import java.io.BufferedInputStream;
import java.io.DataInputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;

public class TestEOF {

	public static void main(String[] args) throws IOException {
		File file = new File(BufferedInputFile.FILE_NAME);
		FileInputStream fileInputStream = new FileInputStream(file);
		BufferedInputStream bufferedInputStream = new BufferedInputStream(fileInputStream);
		DataInputStream in = new DataInputStream(bufferedInputStream);
		
		while(in.available() != 0) {
			char c = (char)in.readByte();
			System.out.print(c);
		}
	}
}
